home *** CD-ROM | disk | FTP | other *** search
- Path: grouper.Exis.Net!usenet
- From: herborn@exis.net (Steve Herborn)
- Newsgroups: comp.lang.c
- Subject: Req: Help with coding assignment {Any C programmers who Bowl?}
- Date: Sun, 17 Mar 1996 05:53:50 GMT
- Organization: Exchange Information Systems Networks
- Message-ID: <314ba37b.25739637@news.exis.net>
- NNTP-Posting-Host: ppp-1-15.exis.net
- X-Newsreader: Forte Agent .99d/32.168
-
- I can't seem to come up with the correct code segment for scoring a
- bowling game.
-
- Where I am at;
-
- I have an array to hold ball 1, ball 2, and frame scores
-
- int score_sheet [3][10]
-
- where score_sheet[0][frame] is # of pins for ball #1
-
- score_sheet[1][frame] is # of pins for ball #2
-
- score_sheet[2][frame] is the total for that frame
-
- All my code for inputing values and value checking is in place and
- works fine. The computation of a frame total with no strike or spares
- after the first frame was easy.
-
- score_sheet[2][frame] =
- score_sheet[2][frame-1]+score_sheet[0][frame]+score_sheet[1][frame]
-
- However, computing the strikes and spares is gettin me all wraped
- around the axle on this one.
-
- Any help is welcomed, flames are not.
-
- I didn't wait to the last minute to do this, just to the last minute
- to ask for help. HELP!
-
- TIA -- Steve
-